package cn.tedu.basic;
/**本类用于测试运算符*/
public class TestOperator {
    public static void main(String[] args) {
        Cat c1 = new Cat();
        Cat c2 = new Cat();

        int[] a1 = {1,2,3};
        int[] a2 = {1,2,3};

        int b1 = 4;
        int b2 = 4;

        boolean f1 = true;
        boolean f2 = true;

        /**==如果比较的是引用类型，比较的值是引用类型变量保存的地址值*/
        System.out.println(c1==c2);//f
        System.out.println(a1==a2);//f
        /**==如果比较的是基本类型，比较的值是基本类型变量保存的字面值*/
        System.out.println(b1==b2);//t
        System.out.println(f1==f2);//t
        System.out.println();
    }
}
class Cat{
    String name;
    int age;
    public void bark(){
        System.out.println("喵喵叫");
    }
}